<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui" 
	template="/template/template_dialog.xhtml">
	<ui:define name="head">
		<title>#{request.getParameter('selectName')}雷击统计</title>
		<link rel="stylesheet" href="/resources/plugins/datatables/dataTables.bootstrap.css"/>
		<link href='/resources/bootstrap/css/bootstrap-datetimepicker.min.css'
			rel='stylesheet' />
	</ui:define>
	<ui:define name="content">
		<nav class="navbar navbar-default" style="margin:0px;">
			<form class="navbar-form navbar-left">
				<div class="btn btn-default">
					<i class="fa fa-calendar"></i>
				</div>
				<div class="form-group">
					<input type="text" class="form-control" id="start" /> <input
						class="form-control" type="text" id="end" />
				</div>
				<div class="btn btn-default" onclick="query()">查询</div>
			</form>
			<form class="navbar-form navbar-right">
				<button id="backBtn" onclick="back();" style="margin-right:20px;display:none;" class="btn btn-primary">
					<i style="margin-right:10px;" class="fa fa-chevron-circle-left"/>
					返回
				</button>
			</form>
		</nav>
		<table id="datatable" style="width: 100%"
			class="table table-gray">
		</table>
		<h:inputHidden id="ename"
			value="#{request.getParameter('ename')}"></h:inputHidden>
		<h:inputHidden id="eid" value="#{request.getParameter('eid')}"></h:inputHidden>
		<h:inputHidden id="showBackBtn" value="#{request.getParameter('showBackBtn')}"></h:inputHidden>
		<h:inputHidden id="startTime" value="#{request.getParameter('startTime')}"></h:inputHidden>
		<h:inputHidden id="endTime" value="#{request.getParameter('endTime')}"></h:inputHidden>
	</ui:define>

	<ui:define name="contentend">
		<script src="/resources/js/tables/mytable.js"></script>
		<script src="/resources/plugins/datatables/jquery.dataTables.min.js"></script>
		<script src="/resources/plugins/datatables/dataTables.bootstrap.min.js"></script>
		<script src="/resources/bootstrap/js/bootstrap-datetimepicker.min.js"></script>
		<script src="#{request.contextPath}/resources/js/date-util.js"></script>
		<script src="thunderFaultDialog.js"></script>
		<script>
			var params = {
					ename:$('#ename').val(),
					eid:$('#eid').val(),
					startTime:$('#startTime').val(),
					endTime:$('#endTime').val(),
					showBackBtn:$('#showBackBtn').val(),
			};
			if(params.showBackBtn){
				$('#backBtn').show();
			}
			function back(){
				if(parent &amp;&amp; parent.backFromChild){
					parent.backFromChild();
				}else{
					window.history.back();
				}
			}
			init();
		</script>
	</ui:define>
</ui:composition>
